﻿using System;
using System.Configuration;

namespace Gonte.Logging
{
    internal sealed class LoggingConfigurationSection
        : ConfigurationSection
    {
        #region Constants

        internal const string LoggerConfigurationSectionString = "LoggingConfigurationSection";

        #endregion

        #region Properties

        /// <summary>
        /// Indicates the path to the configuration file or embedded resource
        /// </summary>
        [ConfigurationProperty("file", DefaultValue = "Logging.config", IsRequired = true)]
        [StringValidator(InvalidCharacters = "!@#$%^&*", MinLength = 1, MaxLength = 255)]
        public string ConfigurationFile
        {
            get
            {
                return (string)this["file"];
            }

            //set
            //{
            //    this["file"] = value;
            //}
        }

        #endregion
    }
}
